<?php
/*******************************************************
*
* Page:    init.php
* Author:  Mickey Freeman (mfreeman@connect2amc.com)
* Purpose: Initialization file for conference connection suite
* Created: 06/26/09
* Version: 1.0
*
* Modified:
*    
*
*******************************************************/
//Require the ws_app classes, database connection, and base path informtion
require_once 'conf/application_config.php';
require_once 'ws_app/config.php';
require_once 'classes/class_config.php';
require_once 'language/aggregate_lang.php';


// Header/footer defines
define ('ABSTRACT_PUBLIC_HEADER', 'include/abstract_header_public.php');
define ('ABSTRACT_PUBLIC_FOOTER', 'include/abstract_footer_public.php');
define ('ABSTRACT_SUB_HEADER', 'include/abstract_sub_header.php');
define ('ABSTRACT_PRIVATE_HEADER', 'include/abstract_header_private.php');
define ('ABSTRACT_PRIVATE_FOOTER', 'include/abstract_footer_private.php');
// stripped down versions for popup windows -- reports views, and admin abstract editing, and such
define ('ABSTRACT_POPUP_HEADER', 'include/abstract_header_private_popup.php');
define ('ABSTRACT_POPUP_FOOTER', 'include/abstract_footer_private_popup.php');


// Table Defines
define ('PAGE_TABLE', 'cms_page');
define ('PROJECT_TABLE', 'cms_project'); 
define ('TEMPLATE_TABLE', 'cms_template');
define ('SEPARATOR_TABLE', 'cms_separator');

// SYSTEM Enabled booleans for various applications
define('ABSTRACT_ENABLED', 1);
define('REVIEWS_ENABLED', 1);
define('SPEAKER_ENABLED', 1);

// Debug setting, session variables will be output in footer.
define ('ABS_DEBUG_MODE', 1);
// debug mode also allows non-complete abstracts to show up in the review assignment page to aid in development.

// Contributor Type defines, must match id fields for database
define ('CONTRIB_TYPE_PRIMARY_AUTH', 1);
define ('CONTRIB_TYPE_CO_AUTH', 2);
define ('CONTRIB_TYPE_REVIEWER', 3);
define ('CONTRIB_TYPE_OFFICIAL', 4);
define ('DEFAULT_CONTRIB_TYPE', CONTRIB_TYPE_PRIMARY_AUTH);

// Permission type defines, must match id fields for database
define ('MEM_TYPE_USER', 1);
define ('MEM_TYPE_REVIEWER', 2);
define ('MEM_TYPE_SPEAKER', 3);
define ('DEFAULT_USER_TYPE', MEM_TYPE_USER);

// Status Type Defines, must match ID fields for database
define ('ABS_STATUS_DRAFT', 1);
define ('ABS_STATUS_COMPLETE', 2);
define ('ABS_STATUS_WITHDRAWN', 3);
define ('ABS_STATUS_APPROVED', 4);
define ('ABS_STATUS_REJECTED', 5);
define ('ABS_STATUS_ENDORSED', 6);
define ('ABS_STATUS_NOT_ENDORSED', 7);
define ('DEFAULT_ABS_STATUS', ABS_STATUS_DRAFT);

//Triggers for Disclosure method, if set to 1, then disclosures are
// per user not per abstract
define ('ABS_DISCLOSURE_MEMBER', 1);


// smarty class files
require_once 'Smarty.class.php';

// ZEND Classes
require_once 'Zend/Session/Namespace.php';


// Smarty Templates Configuration
$smarty = new Smarty();
$smarty->template_dir = APP_BASE_PATH . '/smarty/templates';
$smarty->compile_dir = APP_BASE_PATH . '/smarty/templates_c';
$smarty->cache_dir = APP_BASE_PATH . '/smarty/cache';
$smarty->config_dir = APP_BASE_PATH . '/smarty/configs';
define ('TEMPLATES_DIR', APP_BASE_REL_PATH . 'smarty/templates/');

// Session Namespace initialization
$user_name_space = new Zend_Session_Namespace('aps4_member_data');
$abstract_name_space = new Zend_Session_Namespace('aps4_abstract_data');

define ('ABSTRACT_BODY_MAX_WORDS', 150);


$yes_no = array(1 => 'Yes',
                0 => 'No');

$attest1 = array(1, 0); // 1 = agree, 0 = disagree

$attest2 = array(1, 0, 2); // 1= agree, 0 = disagree, 2 = N/A

$tenure_years = array('N/A',1,2,3);

$roles = array ('Planner', 'Faculty', 'Author', 'Editor', 'Item Writer');
